const http = require('http')

var options = {
  hostname: 'localhost',
  port: 1337,
  path: '/',
  method: 'POST'
};

let request = http.request(options)

request.on('response', res => {
  res.setEncoding('utf8');
  res.on('data', drunk => {
    console.log(drunk.toString());
  })

})
request.write('发送数据')
request.end()